<!doctype html>
<html lang="en" ng-app="dateExample">
<head>
    <meta charset="UTF-8">
    <title>Example - example-datetimelocal-input-directive-production</title>
    <script src="../../js/service/base/config.js"></script>
    <script src="../../js/open/sea/sea.js"></script>
</head>
<body ng-controller="DateController">
<div>
    <div class="col-xs-2" datepicker value="birthday">
</div>
<script>
    seajs.use(["jquery","angular","datepicker"],function(){
        var app  = angular.module('dateExample', []);
        app.controller('DateController', ['$scope', function($scope) {
            var self = this;
            $('.date').datepicker({ autoclose: true, todayHighlight: true });
            $scope.$watch('value', function (oldVal, newVal) {
                console.log("Value: "+ $scope.value);
            });
        }]);
        app.directive('datepicker', function () {
            return {
                restrict: 'A',
                controller: 'DateController',
                controllerAs: 'dp',
                templateUrl: './include/datepicker.html',
                scope: {
                    'value': '='
                },
                link: function (scope) {

                }
            };
        });
    });
</script>

</body>
</html>